﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Friend.aspx.cs" Inherits="NJL.Web.AdminVisitor.Friend" %>

<%@ Register Src="../Controls/WUCUservisitorLeft.ascx" TagName="WUCUservisitorLeft"
    TagPrefix="uc3" %>
<%@ Import Namespace="Royalsoft.Common" %>
<%@ Register Src="../Controls/UCenterHeader.ascx" TagName="UCenterHeader" TagPrefix="uc4" %>
<%@ Register Src="../Controls/UcenterFooter.ascx" TagName="UcenterFooter" TagPrefix="uc5" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>好友关注</title>
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <link href="../Styles/base1.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <link href="../Styles/manage.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/js/jquery.skygqbox.1.3.js" type="text/javascript" charset="UTF-8"></script>
    <script type="text/javascript">
        function textboxSelect() {
            var checkbox = document.getElementsByName("cbxSingle");
            for (var i = 0; i < checkbox.length; i++) {
                checkbox[i].checked = !checkbox[i].checked;
            }
        }
        function checkCheckboxState() {
            var checkbox = document.getElementsByName("cbxSingle");
            var hiddenId = "";
            var count = 0;
            for (var i = 0; i < checkbox.length; i++) {
                if (checkbox[i].checked == true) {
                    hiddenId += checkbox[i].value + ",";
                    count++;
                }
            }
            if (count == 0) {
                alert('请选择您要删除的记录')
                return false;
            }
            else {
                if (window.confirm("您确定要删除吗？")) {
                    hiddenId = hiddenId.substring(0, hiddenId.length - 1);
                    document.getElementById("<%=HSelectId.ClientID %>").value = hiddenId;
                }
                else {
                    return false;
                }
            }
        }
        function getUserId(userid) {
            document.getElementById("hiduserid").value = userid;
        }
        function SendMes() {
            var userid = document.getElementById("hiduserid").value
            var content = document.getElementById("TextArea1").value;
            content = $.trim(content);
            if (content == "") {
                alert("内容不能为空哦^_^")
                return false;
            }
            if (content.length > 500) {
                alert("发送消息不能超过500个字符哦");
                return false;
            }
            $.ajax({
                type: 'POST',
                url: '../Handle/Handler.ashx',
                data: 'sendUserid=' + userid + '&content=' + escape(content) + '&Random=' + Math.random(),
                dataType: 'text',
                success: function (msg) {
                    if (msg == "true") {
                        document.getElementById("TextArea1").value = "";
                        alert("发送信息成功");
                        $.skygqbox.hide();
                    }
                },
                error: function () {
                    $.skygqbox.hide();
                }
            })
        }
    </script>
</head>
<body class="managebg">
    <form id="form1" runat="server">
    <uc4:UCenterHeader ID="UCenterHeader1" runat="server" />
    <div class="managecont02 cleanFlex">
        <!--右侧内容-->
        <div class="f_right manageRight" id="right">
            <!--位置-->
            <div class="place">
                <span>欢迎您：<%=UserName %>&nbsp;&nbsp;[<a href="/Logout.aspx" class="green">退出登陆</a>]</span>
                <p>
                    您现在的位置是&nbsp;<strong><a href="Default.aspx">用户中心</a></strong>&gt;&gt;<strong>好友关注</strong></p>
            </div>
            <!--基本信息内容-->
            <div class="cleanFlex m_top_10">
            </div>
            <div>
                <!--标题-->
                <div class="">
                    <ul class="titleTabmanage">
                        <li class="now">
                            <p>
                                <a href="#">关注的人</a></p>
                        </li>
                         <li>
                            <p>
                               <a href="/xcgc/" target="_blank">添加关注</a></p>
                        </li>
                    </ul>
                </div>
                <div class="cont">
                    <ul class="manageFriend">
                        <asp:Repeater runat="server" ID="rptContent" OnItemCommand="rptContent_ItemCommand1">
                            <ItemTemplate>
                                <li>
                                    <dl>
                                        <dt><a href="../Visitor/Default.aspx?uid=<%#Eval("FRIEND_USER_ID") %>" target="_blank">
                                            <img src="<%#Eval("IMAGE_CODE").ToString()!=""?GetImageUrl(Eval("IMAGE_CODE").ToString(),"U2"):"/Images/avatar.jpg" %>"
                                                alt="<%#Eval("USER_NAME") %>" width="67px" height="50px" class="picBor" /></a>
                                        </dt>
                                         <dd class="operate m_top_20">
                                            <span class="icon_arrow"><a href="javascript:$('#sendMes').skygqbox();getUserId('<%#Eval("FRIEND_USER_ID") %>')">
                                                发送消息</a> </span><span>
                                                    <asp:LinkButton ID="lbtnDel" runat="server" CommandName="Del" CommandArgument='<%#Eval("ID2") %>'
                                                        OnClientClick="return confirm('您确定要取消关注吗？')" class="delete" ToolTip="取消关注"></asp:LinkButton>
                                                </span>
                                        </dd>
                                        <dd>
                                            <h3>
                                                <a href="../Visitor/Default.aspx?uid=<%#Eval("FRIEND_USER_ID") %>" target="_blank">
                                                    <%#Eval("USER_NAME")%></a></h3>
                                        </dd>
                                        <dd>
                                       <%#Eval("SELF_EVALUATION")%>
                                        </dd>
                                       
                                        
                                    </dl>
                                </li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
                <!--弹出层-->
                <div id="sendMes" style="display: none; width: 360px;">
                    <ul>
                        <li>
                            <textarea id="TextArea1" rows="10" style="width: 100%"></textarea>
                        </li>
                        <li style="text-align: right">
                            <input id="Button1" type="button" value="确定" class="greenBtn02" onclick="SendMes()" />&nbsp;&nbsp;
                            <input id="Button2" type="button" value="取消" class="greenBtn02" onclick="$.skygqbox.hide();" />
                        </li>
                    </ul>
                </div>
                <!--分页-->
                <div class="cleanFlex">
                </div>
                <!--分页-->
                <div class="page cleanFlex m_top_10">
                    共
                    <asp:Literal ID="lit" runat="server"></asp:Literal>
                    条记录&nbsp;&nbsp;&nbsp;&nbsp; 共
                    <asp:Literal ID="litAllPage" runat="server"></asp:Literal>
                    页&nbsp;&nbsp;&nbsp;&nbsp; 第
                    <asp:Literal ID="litCurrentPage" runat="server"></asp:Literal>
                    页
                    <asp:LinkButton ID="lbtnFirst" runat="server" OnClick="lbtnFirst_Click">首页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnPrev" runat="server" OnClick="lbtnPrev_Click">上一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnNext" runat="server" OnClick="lbtnNext_Click">下一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnEnd" runat="server" OnClick="lbtnEnd_Click">末页</asp:LinkButton>
                    跳转到第
                    <asp:TextBox ID="txtPage" runat="server" Width="32px" MaxLength="8" Style="text-align: center"
                        class="input"></asp:TextBox>&nbsp;页&nbsp;
                    <asp:Button ID="btnRir" runat="server" Text="确定" OnClick="btnRir_Click" CssClass="greenBtn"
                        onmouseover="this.className='greenBtnOver'" onmouseout="this.className='greenBtn'" />
                </div>
            </div>
        </div>
        <uc3:WUCUservisitorLeft ID="WUCUservisitorLeft1" runat="server" />
        <div class="managecontbottom">
        </div>
    </div>
    <div style="text-align: center">
    </div>
    <input id="hiduserid" type="hidden" />
    <asp:HiddenField ID="HSelectId" runat="server" />
    <uc5:UcenterFooter ID="UcenterFooter1" runat="server" />
    </form>
</body>
</html>
